package com.zrh.jsd.service.studydemo.common_thread;

import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.LongAdder;

public class ThreadCommonMethod {
    public static void main(String[] args) {
        AtomicInteger atomicInteger = new AtomicInteger();
        int i=0;
        while(i<10){
            System.out.println(atomicInteger.incrementAndGet());
            i++;
        }
        LongAdder longAdder = new LongAdder();
        longAdder.increment();
        System.out.println(longAdder.sum());
    }
}
